AC_DEFUN([AX_C___FUNC__],
  [AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_c___func__])dnl
   AC_CACHE_CHECK([whether _AC_LANG compiler defines __func__], CACHEVAR,
    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return printf("%s\n", __func__);])],
      [AS_VAR_SET(CACHEVAR, [yes])], [AS_VAR_SET(CACHEVAR, [no])])])
  AS_IF([test x"AS_VAR_GET(CACHEVAR)" = "xyes"],
    [AC_DEFINE([HAVE___FUNC__], [1], [define if compiler supports __func__])])])dnl AX_C___FUNC__
